3.16 \(\int \frac{1}{a+b \cosh ^2(x)} \, dx\)

Optimal. Leaf size=29 \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{\sqrt{a} \sqrt{a+b}} \]

[Out]

ArcTanh[(Sqrt[a]*Tanh[x])/Sqrt[a + b]]/(Sqrt[a]*Sqrt[a + b])

________________________________________________________________________________________

Rubi [A]  time = 0.0218575, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3181, 208} \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{\sqrt{a} \sqrt{a+b}} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Cosh[x]^2)^(-1),x]

[Out]

ArcTanh[(Sqrt[a]*Tanh[x])/Sqrt[a + b]]/(Sqrt[a]*Sqrt[a + b])

Rule 3181

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist
[ff/f, Subst[Int[1/(a + (a + b)*ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{1}{a+b \cosh ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{a-(a+b) x^2} \, dx,x,\coth (x)\right )\\ &=\frac{\tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{\sqrt{a} \sqrt{a+b}}\\ \end{align*}

Mathematica [A]  time = 0.0632053, size = 29, normalized size = 1. \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{\sqrt{a} \sqrt{a+b}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Cosh[x]^2)^(-1),x]

[Out]

ArcTanh[(Sqrt[a]*Tanh[x])/Sqrt[a + b]]/(Sqrt[a]*Sqrt[a + b])

________________________________________________________________________________________

Maple [B]  time = 0.023, size = 78, normalized size = 2.7 \begin{align*}{\frac{1}{2}\ln \left ( \sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+2\,\sqrt{a}\tanh \left ( x/2 \right ) +\sqrt{a+b} \right ){\frac{1}{\sqrt{a}}}{\frac{1}{\sqrt{a+b}}}}-{\frac{1}{2}\ln \left ( \sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}-2\,\sqrt{a}\tanh \left ( x/2 \right ) +\sqrt{a+b} \right ){\frac{1}{\sqrt{a}}}{\frac{1}{\sqrt{a+b}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b*cosh(x)^2),x)

[Out]

1/2/a^(1/2)/(a+b)^(1/2)*ln((a+b)^(1/2)*tanh(1/2*x)^2+2*a^(1/2)*tanh(1/2*x)+(a+b)^(1/2))-1/2/a^(1/2)/(a+b)^(1/2
)*ln((a+b)^(1/2)*tanh(1/2*x)^2-2*a^(1/2)*tanh(1/2*x)+(a+b)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cosh(x)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.98422, size = 828, normalized size = 28.55 \begin{align*} \left [\frac{\log \left (\frac{b^{2} \cosh \left (x\right )^{4} + 4 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + b^{2} \sinh \left (x\right )^{4} + 2 \,{\left (2 \, a b + b^{2}\right )} \cosh \left (x\right )^{2} + 2 \,{\left (3 \, b^{2} \cosh \left (x\right )^{2} + 2 \, a b + b^{2}\right )} \sinh \left (x\right )^{2} + 8 \, a^{2} + 8 \, a b + b^{2} + 4 \,{\left (b^{2} \cosh \left (x\right )^{3} +{\left (2 \, a b + b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) - 4 \,{\left (b \cosh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + b \sinh \left (x\right )^{2} + 2 \, a + b\right )} \sqrt{a^{2} + a b}}{b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} + 2 \,{\left (2 \, a + b\right )} \cosh \left (x\right )^{2} + 2 \,{\left (3 \, b \cosh \left (x\right )^{2} + 2 \, a + b\right )} \sinh \left (x\right )^{2} + 4 \,{\left (b \cosh \left (x\right )^{3} +{\left (2 \, a + b\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) + b}\right )}{2 \, \sqrt{a^{2} + a b}}, \frac{\sqrt{-a^{2} - a b} \arctan \left (\frac{{\left (b \cosh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + b \sinh \left (x\right )^{2} + 2 \, a + b\right )} \sqrt{-a^{2} - a b}}{2 \,{\left (a^{2} + a b\right )}}\right )}{a^{2} + a b}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cosh(x)^2),x, algorithm="fricas")

[Out]

[1/2*log((b^2*cosh(x)^4 + 4*b^2*cosh(x)*sinh(x)^3 + b^2*sinh(x)^4 + 2*(2*a*b + b^2)*cosh(x)^2 + 2*(3*b^2*cosh(
x)^2 + 2*a*b + b^2)*sinh(x)^2 + 8*a^2 + 8*a*b + b^2 + 4*(b^2*cosh(x)^3 + (2*a*b + b^2)*cosh(x))*sinh(x) - 4*(b
*cosh(x)^2 + 2*b*cosh(x)*sinh(x) + b*sinh(x)^2 + 2*a + b)*sqrt(a^2 + a*b))/(b*cosh(x)^4 + 4*b*cosh(x)*sinh(x)^
3 + b*sinh(x)^4 + 2*(2*a + b)*cosh(x)^2 + 2*(3*b*cosh(x)^2 + 2*a + b)*sinh(x)^2 + 4*(b*cosh(x)^3 + (2*a + b)*c
osh(x))*sinh(x) + b))/sqrt(a^2 + a*b), sqrt(-a^2 - a*b)*arctan(1/2*(b*cosh(x)^2 + 2*b*cosh(x)*sinh(x) + b*sinh
(x)^2 + 2*a + b)*sqrt(-a^2 - a*b)/(a^2 + a*b))/(a^2 + a*b)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cosh(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.2333, size = 53, normalized size = 1.83 \begin{align*} \frac{\arctan \left (\frac{b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt{-a^{2} - a b}}\right )}{\sqrt{-a^{2} - a b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cosh(x)^2),x, algorithm="giac")

[Out]

arctan(1/2*(b*e^(2*x) + 2*a + b)/sqrt(-a^2 - a*b))/sqrt(-a^2 - a*b)